﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using HT.Future.FileServer.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace HT.Future.FileServer.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class ProductController : ControllerBase
    {
        public string Get()
        {
            return "文件服务";
        }

        [HttpPost]
        public IActionResult Post([FromBody]List<ProductImage> images)
        {
            images.ForEach(image =>
            {
                image.Save();
            });
            return Ok("保存成功");
        }
    }
}
